Sampling of database transactions from a database transactions log file can provide useful information about the database performance and environment. If the transactions are single-level transactions, that is, each transaction is only a single database operation, for example, one SQL statement, then the sampling of transactions from the log file is rather straight forward. Typically, database transactions are multi-level transactions. Each transaction can include several database operations. In addition, while the database operation records for a transaction will usually appear in the proper order in the database transaction log file, the database operation records from multiple transactions can be intermixed. With multi-level transactions, to sample a database transaction from the log file requires identifying and extracting all the database operation records associated with the transaction. These factors can complicate sampling of transactions from a database transaction log file.